package zuoye;

import java.util.ArrayList;

public class zuoye6 {
	public static void main(String[] args) {
		int [] a1={1,2,3},a2={3,4,5,2};
		ArrayList<Integer> list = new ArrayList<Integer>();
		ArrayList<Integer> list1 = new ArrayList<Integer>();
		int [] aa=new int[a1.length +a2.length];
		for(int i=0;i<a1.length +a2.length;i++){
			if(i<a1.length)
				list.add(a1[i]);
			else
				list.add(a2[i-a1.length]);
		}
		System.out.println(list);
		for(Integer c:list){
			if(list1.contains(c))
				continue;
			else
				list1.add(c);
		}
		System.out.println(list1);
	}
}
